﻿<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head>
  <title>Sign In | MCloud</title>
  <th:block th:replace="fragments/layout::core-css"/>
  <th:block th:replace="fragments/layout::app-css"/>
</head>

<body class="login-page">
<div class="login-box">
  <div class="logo">
    <a href="javascript:void(0);">MCloud</a>
    <small>MCloud Login Form</small>
  </div>
  <div th:if="${param.error}" class="alert bg-red alert-dismissible">
    <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span>
    </button>
    Invalid username or password.
  </div>
  <div class="card">
    <div class="body">
      <form id="sign_in" method="POST" th:action="@{/login}">
        <div class="msg">Sign in to start your session</div>
        <div class="input-group">
          <span class="input-group-addon">
              <i class="material-icons">person</i>
          </span>
          <div class="form-line">
            <input type="text" class="form-control" name="username" placeholder="Username" required autofocus>
          </div>
        </div>
        <div class="input-group">
          <span class="input-group-addon">
              <i class="material-icons">lock</i>
          </span>
          <div class="form-line">
            <input type="password" class="form-control" name="password" placeholder="Password" required>
          </div>
        </div>
        <div class="row">
          <div class="col-xs-8 p-t-5">
            <input type="checkbox" name="rememberme" id="rememberme" class="filled-in chk-col-pink">
            <label for="rememberme">Remember Me</label>
          </div>
          <div class="col-xs-4">
            <button class="btn btn-block bg-pink waves-effect" type="submit">SIGN IN</button>
          </div>
        </div>
        <div class="row m-t-15 m-b--20">
          <div class="col-xs-6">
            <a th:href="@{/register}">Register Now!</a>
          </div>
          <div class="col-xs-6 align-right">
            <a href="forgot-password.html">Forgot Password?</a>
          </div>
        </div>
      </form>
    </div>
  </div>
</div>

<th:block th:replace="fragments/layout::core-js"/>
<th:block th:replace="fragments/plugins::jquery-form"/>

<script>
    $(function () {
        $('#sign_in').mvalidate();
    });
</script>
</body>

</html>